import i18n from '@/common/lang'

export const columns = [
  {
    label: i18n.t('financialSynergy.statement.account'),
    minWidth: 170,
    width: 'auto',
    prop: 'number',
    fixed: true
  },
  {
    label: i18n.t('financialSynergy.statement.supplierName'),
    width: 'auto',
    minWidth: 170,
    prop: 'supplierName',
    fixed: true
  },
  {
    label: i18n.t('financialSynergy.statement.accountBeginDate'),
    width: 'auto',
    minWidth: 160,
    prop: 'beginDate'
  },
  {
    label: i18n.t('financialSynergy.statement.accountEndDate'),
    width: 'auto',
    minWidth: 160,
    prop: 'endDate'
  },
  {
    label: i18n.t('financialSynergy.statement.untaxedAmount'),
    width: 'auto',
    minWidth: 140,
    prop: 'untaxedAmount'
  },
  {
    label: i18n.t('financialSynergy.statement.taxedAmount'),
    width: 'auto',
    minWidth: 140,
    prop: 'totalAmount'
  },
  {
    label: i18n.t('financialSynergy.statement.createName'),
    width: 'auto',
    prop: 'createName'
  },
  {
    label: i18n.t('financialSynergy.statement.createTime'),
    width: 'auto',
    minWidth: 160,
    prop: 'createTime'
  },
  {
    label: i18n.t('financialSynergy.statement.state'),
    width: 'auto',
    prop: 'state'
  },
  {
    label: i18n.t('financialSynergy.statement.invoiceState'),
    width: 'auto',
    prop: 'invoiceState'
  }
]
export const invoiceStateOptions = [
  { dictLabel: '未开票', dictValue: '0' },
  { dictLabel: '已开票', dictValue: '1' }
]
export const actions = [
  {
    key: 'detail',
    text: i18n.t('common.detail'),
    permissions: 'srm:bill:detail'
  },
  {
    key: 'edit',
    text: i18n.t('common.edit'),
    permissions: 'srm:bill:edit'
  },
  {
    key: 'delete',
    text: i18n.t('common.delete'),
    permissions: 'srm:bill:delete'
  },
  {
    key: 'cancel',
    text: i18n.t('common.cancel'),
    permissions: 'srm:bill:cancel'
  },
  {
    key: 'send',
    text: i18n.t('common.send'),
    permissions: 'srm:bill:send'
  }
]

// 对账明细列表

export const itemColumns = [
  {
    label: i18n.t('financialSynergy.statement.billNumber'),
    // minWidth: 140,
    width: 'auto',
    prop: 'order',
    fixed: true
  },
  {
    label: i18n.t('financialSynergy.statement.billStartData'),
    // minWidth: 140,
    width: 'auto',
    prop: 'order',
    fixed: true
  },
  {
    label: i18n.t('financialSynergy.statement.billEndDate'),
    // minWidth: 140,
    width: 'auto',
    prop: 'order',
    fixed: true
  },
  {
    label: i18n.t('financialSynergy.statement.totalAmountNoTax'),
    // minWidth: 140,
    width: 'auto',
    prop: 'order'
  },
  {
    label: i18n.t('financialSynergy.statement.totalAmountTax'),
    // minWidth: 140,
    width: 'auto',
    prop: 'order'
  }
]
export const itemAcitons = [
  {
    key: 'delete',
    text: i18n.t('common.delete')
    // permissions: 'upms:dict:update'
  }
]

// 对账单列表

export const detailColumns = [
  {
    label: i18n.t('financialSynergy.statement.receivingNumber'),
    width: 150,
    prop: 'noteNumber',
    fixed: true
  },
  {
    label: i18n.t('financialSynergy.statement.materialCode'),
    width: 150,
    prop: 'materialCode'
  },
  {
    label: i18n.t('financialSynergy.statement.materialName'),
    width: 150,
    prop: 'materialName'
  },
  {
    label: i18n.t('financialSynergy.statement.materialSpecs'),
    width: 150,
    prop: 'materialSpecs'
  },
  {
    label: i18n.t('financialSynergy.statement.materialType'),
    width: 'auto',
    prop: 'materialType'
  },
  {
    label: i18n.t('financialSynergy.statement.materialUnit'),
    width: 'auto',
    prop: 'materialUnit'
  },
  {
    label: i18n.t('financialSynergy.statement.untaxedPrice'),
    width: 150,
    prop: 'untaxedPrice'
  },
  {
    label: i18n.t('financialSynergy.statement.taxRate'),
    width: 'auto',
    prop: 'taxRate'
  },
  {
    label: i18n.t('financialSynergy.statement.unitPrice'),
    width: 150,
    prop: 'unitPrice'
  },
  {
    label: i18n.t('financialSynergy.statement.quantity'),
    width: 120,
    prop: 'quantity'
  },
  {
    label: i18n.t('financialSynergy.statement.deliveryQuantity'),
    width: 150,
    prop: 'deliveryQuantity'
  },
  {
    label: i18n.t('financialSynergy.statement.realityReceivedQuantity'),
    width: 150,
    prop: 'receivedQuantity'
  }
]
export const billsActions = []
